#include <bits/stdc++.h>
using namespace std;
struct polarr
{
    double distance;
    double angle;
};
struct rect
{
    double x;
    double y;
};
void rect_to_polar(rect *pxy, polarr *pda)
{
    pda->distance=sqrt(pxy->x*pxy->x+pxy->y*pxy->y);
    pda->angle=atan2(pxy->y, pxy->x);
}
void show_polar(polarr *pda)
{
    double pi=57.29577951;
    cout<<"distance:"<<pda->distance<<endl;
    cout<<"angle:"<<pda->angle*pi<<" degrees."<<endl;
}
int main()
{
    rect rplace;
    polarr pplace;
    cout<<"enter x & y values"<<endl;
    while(cin>>rplace.x>>rplace.y)
    {
        rect_to_polar(&rplace, &pplace);
        show_polar(&pplace);
        cout<<"next 2 numbers: "<<endl;
    }
    return 0;
}